package com.aaa.dem1103.d03;

import java.util.function.Consumer;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/11/3  16:27
 */
public class TestConsumer {
    public static void main(String[] args) {
        Consumer<Double> c= a->{
            System.out.println("游泳需要花费:"+a);
        };

        fun(c,1500.0);
    }

    public static void fun(Consumer<Double> consumer,Double money){
        consumer.accept(money);
    }
}
